#第1关：从文件中读取数据：信息时代已经到来
#coding=utf-8
#
# #输入n
# n = int(input())
#
# with open('src/Step1/test.txt') as file_object:
#     lines = file_object.readlines()
#
# # 请在此添加代码，实现编程要求
# #********** Begin *********#
# i = 0
# for line in lines:
#     print(line.rstrip())
#     i=i+1
#     if(i==n):
#         break
#
#
# #********** End **********#





#第2关：将信息写入文件：会读会写方为正道
#coding=utf-8
#
# #输入字符串
# s = input()
#
# # 请在此添加代码，将字符串s输入到test2.txt中
# #********** Begin *********#
#
# with open('src/Step2/test2.txt','w') as example:
#     example.write(s)
#
#
# #********** End **********#
#
# #输出test2.txt中的内容
# with open('src/Step2/test2.txt') as file_object:
#     lines = file_object.readlines()
# for line in lines:
#     print(line.rstrip())






# #第3关：学习-Python文件之上下文管理语句with
# # 请在下面的Begin-End之间按照注释中给出的提示编写正确的代码
# ########## Begin ##########
# # 使用 with 语句读取文件内容，并打印每一行内容的列表
# file_name = input()
# file_path = "step4/"+file_name
# with open(file_path,"r")as f:
#     print(f.readlines())

# ########## End ##########
#




